<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
// specific controller?
$controller = JFactory::getApplication()->input->get('controller','Detainckh');
// Require specific controller if requested
require_once (JPATH_COMPONENT.'/controllers/'.ucfirst($controller).'.php');
// require_once( JPATH_COMPONENT.'/models/dmdaotao.php' );
// require_once( JPATH_COMPONENT.'/models/trinhdodaotao.php' );
// require_once( JPATH_COMPONENT.'/views/'.$controller.'/view.html.php' );
require_once JPATH_COMPONENT.'/helpers/Dmdaotao.php';

DmdaotaoHelper::addButton();
DmdaotaoHelper::addSubmenu($controller);

// Create the controller
$classname  = 'DmdaotaoController'.ucfirst($controller);

//$controller = new $classname( array('default_task' => 'display') );
$controller = new $classname();
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();